package com.example;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.context.annotation.Bean;

/**
 * Sky Sentinel微服务启动类
 */
/**
 * Sky Sentinel微服务启动类
 * 关键：添加 exclude = DataSourceAutoConfiguration.class 禁用数据源自动配置
 */
@SpringBootApplication
public class SentinelApplication {

    public static void main(String[] args) {
        SpringApplication.run(SentinelApplication.class, args);
    }

    /**
     * 注入Sentinel注解切面，支持@SentinelResource
     */
    @Bean
    public SentinelResourceAspect sentinelResourceAspect() {
        return new SentinelResourceAspect();
    }
}